<template>
	<view>
		
		<!-- #ifdef APP-PLUS || MP-WEIXIN -->
		<u-navbar title="提现账号" back-icon-color="#000" :is-back="true" title-color="#000" :background="{ background:'#ffffff'}" :border-bottom="true"></u-navbar>
		<!-- #endif -->

		<u-cell-group>
			
			<u-cell-item arrow @click="ToPages" index="1">
				<view slot="title" class="l_title">
					<image class="l_icon" :src="BestImgUrl+'me/set_wxicon.png'" mode="widthFix"></image>微信
				</view>
				<view slot="icon"></view>
				<view slot="right-icon">
					<view class="wx_info">
						<image class="my_wx_cion" :src="userData.avatar"></image>{{userData.nickname + '的微信'}}
					</view>
				</view>
			</u-cell-item>
			
			<!-- <u-cell-item :value="alipayInfo.alipay_number || '暂无设置'" arrow @click="ToPages" index="2">
				<view slot="title" class="l_title">
					<image class="l_icon" :src="BestImgUrl+'me/set_alipayicon.png'" mode="widthFix"></image>支付宝
				</view>
				<view slot="icon"></view>
			</u-cell-item> -->
		</u-cell-group>

	</view>
</template>

<script>
	const app = getApp();
	export default {
		data() {
			return {
				userData: {},
				alipayInfo: {},
				BestImgUrl: app.globalData.imgurlBwc,
				is_appid: ""
			}
		},
		onLoad() {
			let appid = uni.getStorageSync('miniProgramAppId');
			this.is_appid = appid
			console.log('appid',appid)
		},
		onShow() {
			let that = this
			that.getAliPayInfo()
			let userInfo = uni.getStorageSync('userinfo')
			that.userData = userInfo
			
			
		},
		methods: {
			getAliPayInfo() {
				let that = this
				that.$api.getaliPayinfo({
			
				}).then(res => {
					that.alipayInfo = res.data.result
				}).catch(err => {
					uni.showToast({
						title: err.data.msg,
						icon: 'none',
						duration: 2000
					});
				})
			},
			ToPages(e) {
				console.log(e);
				let appid = this.is_appid;
				if (e == 1) {
					//uni.navigateTo({
					//	url: '/pages/me/BasicSettings/ChangebindingWeChat'
					//})
				}else if(e == 2){// && appid != "wx3b96794d5a491689"
					// uni.navigateTo({
					// 	url: '/mePages/pages/BasicSettings/SetAlipay',
					// 	animationType: 'pop-in'
					// })
				}else if(e == 3){
					uni.navigateTo({
						url: '/mePages/pages/BasicSettings/SetRealname',
						animationType: 'pop-in'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.l_title {
		display: flex;
		align-items: center;
		.l_icon {
			width: 40rpx;
			height: 40rpx;
			margin-right: 20rpx;
		}
	}
	.wx_info {
		display: flex;
		align-items: center;

		.my_wx_cion {
			width: 50rpx;
			height: 50rpx;
			margin-right: 20rpx;
			border-radius: 200rpx;
		}
	}
</style>
